﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace leodesigner
{
    public partial class TypeSelector : Form
    {
        public TypeSelector()
        {
            InitializeComponent();
            Fill();
        }

        void Fill()
        {
            interop.server.fill_typetree(typeTree.Nodes);
            typeTree.Sort();
        }

        public string GetSelectedTypeName()
        {
            if (typeTree.SelectedNode == null)
                return null;

            return typeTree.SelectedNode.Text;
        }

        private void typeTree_DoubleClick(object sender, EventArgs e)
        {
            okButton.PerformClick();
        }
    }
}
